package com.management.vtribe.service;

import com.management.vtribe.Bean.Tag;
import com.management.vtribe.mapper.TagMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TagService {
    @Autowired
    TagMapper tagMapper;

    public List<Tag> getAllTag(){
        return tagMapper.getAllTag();
    };

    public int updateUserTag(int uid,int[] tids){
        tagMapper.deleteUserTagById(uid);
        return tagMapper.updateUserTag(uid, tids);
    }

    public int deleteUserTagById(int id){
        return tagMapper.deleteUserTagById(id);
    }
}
